<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="cn.yunhe.entity.Book" %>
<%@ page import="cn.yunhe.util.BaseActionUtil" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--通过struts标签库 里的select进行下拉框内容设置--%>
<%
    List bookList = new ArrayList();
    Book book = new Book(1, "解忧杂货店", "詹姆斯", "日本");
    Book book1 = new Book(2, "阿甘正传", "阿斯达", "美国");
    Book book2 = new Book(3, "生死疲劳", "莫言", "中国");
    Book book3 = new Book(4, "斗罗大陆", "我吃西红柿", "中国");
    bookList.add(book);
    bookList.add(book1);
    bookList.add(book2);
    bookList.add(book3);
    BaseActionUtil baseActionUtil = new BaseActionUtil();
    baseActionUtil.getSessionMap().put("bookList", bookList);

%>
<s:select list="#session.bookList" listKey="bookId"
listValue="bookName" name="bookId"/>

<br/>
<s:form action="vote">
    <%--如果想要拦截指定提交页面 必须为其指定token标签才能拦截--%>
    <s:token/>
    在线投票--你对本网站的评价<br/>
    <s:radio list="#{'verygood':'非常好','good':'好','common':'一般'}"
             listKey="key"
             listValue="value"
             name="selVote"/>
    <s:submit value="投票"/>
</s:form>
</body>
</html>
